/**
 * Created by leiz on 2017/3/22.
 */
LoginController.$inject = ['$scope', '$location', 'UserInfoService', 'toastr', 'permissions', '$cookieStore'];

function LoginController($scope, $location, UserInfoService, toastr, permissions, $cookieStore) {
    $scope.viewModel = {
        account: "haihuahuang",
        password: "Password@1"
    };
    $scope.login = function () {
        var data = {userName: $scope.viewModel.account, password: $scope.viewModel.password};
        console.log(data);
        $location.path("/main");
        /*UserInfoService.loginUser(data).then(function (result) {
            console.log(data);
            if (result.responseCode == '10000') {
                permissions.setPermissions(result.body);
                $location.path("/main");
            } else {
                toastr.error(result.responseMsg);
            }
        });*/
    };
}

angular.module('controller').controller("LoginController", LoginController);
